
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url()?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">用户管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="<?=site_url('users/index')?>" method="get">
                    <table class="search-tab">
                        <tr>
                            <th width="120">选择权限:</th>
                            <td>
                                <select name="level" id="">
                                    <option value="0">全部</option>
                                    <?php foreach($level as $k => $v):?>
                                    <option value="<?=$v['group_id']?>" <?=@$_GET['level'] == $v['group_id'] ? 'selected' : '';?>><?=$v['name']?></option>
                                    <?php endforeach;?>
                                    <option value="user" <?=@$_GET['level'] == 'user' ? 'selected' : '';?>>普通会员</option>
                                </select>
                            </td>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="用户账号或者名称" name="words" value="<?=@$_GET['words']?>" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" value="查询" type="submit"></td>
                            <td><a class="btn btn-primary btn2" href="<?=site_url('users')?>">重置查询</a></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <span>该用户和电子商铺后台用户数据对接</span>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>用户ID</th>
                            <th>账号</th>
                            <th>名称</th>
                            <th>用户邮箱</th>
                            <th>工作单位</th>
                            <th>联系电话</th>
                            <th>权限名称</th>
                            <th>下辖商铺</th>
                            <th>总共金额</th>
                            <th>缴费店铺</th>
                            <th>操作</th>
                        </tr>

                        <?php foreach($list as $k => $v): ?>
                        <tr>
                            
                            <td><?=$v['user_id']?></td>
                            <td><?=$v['username']?></td>
                            <td><?=$v['user_name']?></td>
                            <td><?=$v['email']?></td>
                            <td><?=$v['unit']?></td>
                            <td><?=$v['photo']?></td>
                            <?php if(empty($v['level']['name'])):?>
                                <td><?=$v['level']?></td>
                            <?php else:?>
                                <td><a href="<?=site_url('users/index?pid='.$v['user_id'])?>"><?=$v['level']['name']?></a></td>
                            <?php endif;?>

                            <td><?=$v['count']?></td>
                            <td><?=$v['bull']?></td>

                            <?php if(!empty($v['s_count'])):?>
                                <td style="color:#61AF08">有</td>
                            <?php else: ?>
                                <td>无</td>
                            <?php endif;?>
                            <td>
                                <?php if($v['group'] == 4): ?>
                                <a class="link-update" href="javascript:;" onclick="get_info(<?=$v['user_id']?>)">查看详情</a>
                                <?php endif;?>
                            </td>
                            
                        </tr>
                        <?php endforeach;?>
                        
                    </table>
                    <div class="list-page"><?=$page ?></div>
                </div>
            </form>
        </div>

<script type="text/javascript">
    function get_info(uid){
        layer.open({
            type: 2,
            title: '用户详情',
            shadeClose: true,
            shade: 0.8,
            area: ['50%', '50%'],
            content: "<?=site_url('bull/user_info')?>?uid="+uid //iframe的url
        }); 
    }
</script>